<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - dijon.System</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/dijon.System.html">dijon.System</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class dijon.System
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
				
			
				dijon.System
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/_Users_creynder_Dropbox_Work_Projects_CREY - dijon_dev_src_dijon.js.html">dijon.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class dijon.System.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/dijon.System.html#constructor">dijon.System</a></b>()
							</div>
							<div class="description"></div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class dijon.System.">
					<caption>Field Summary</caption>
					<thead>
						<tr>
							<th scope="col">Field Attributes</th>
							<th scope="col">Field Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/dijon.System.html#autoMapOutlets">autoMapOutlets</a></b>
								</div>
								<div class="description">Enables the automatic mapping of outlets for mapped values, singletons and classes
When this is true any value, singleton or class that is mapped will automatically be mapped as a global outlet
using the value of <code>key</code> as outlet name</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/dijon.System.html#postInjectionHook">postInjectionHook</a></b>
								</div>
								<div class="description">The name of the method that will be called for all instances, right after injection has occured.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/dijon.System.html#strictInjections">strictInjections</a></b>
								</div>
								<div class="description">When <code>true</code> injections are made only if an object has a property with the mapped outlet name.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class dijon.System.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#getObject">getObject</a></b>(key)
								</div>
								<div class="description">Retrieve (or create) the object mapped to <code>key</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#hasMapping">hasMapping</a></b>(key)
								</div>
								<div class="description">Returns whether the key is mapped to an object</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#injectInto">injectInto</a></b>(instance, key)
								</div>
								<div class="description">Perform an injection into an object's mapped outlets, satisfying all it's dependencies</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#instantiate">instantiate</a></b>(key)
								</div>
								<div class="description">Force instantiation of the class mapped to <code>key</code>, whether it was mapped as a singleton or not.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#mapClass">mapClass</a></b>(key, clazz)
								</div>
								<div class="description">Maps <code>clazz</code> as a factory to <code>key</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#mapHandler">mapHandler</a></b>(eventName/route, key, handler, oneShot, passEvent)
								</div>
								<div class="description">maps a handler for an event/route.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#mapOutlet">mapOutlet</a></b>(sourceKey, targetKey, outletName)
								</div>
								<div class="description">defines <code>outletName</code> as an injection point in <code>targetKey</code>for the object mapped to <code>sourceKey</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#mapSingleton">mapSingleton</a></b>(key, clazz)
								</div>
								<div class="description">Maps <code>clazz</code> as a singleton factory to <code>key</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#mapValue">mapValue</a></b>(key, useValue)
								</div>
								<div class="description">Maps <code>useValue</code> to <code>key</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#notify">notify</a></b>(eventName/route)
								</div>
								<div class="description">calls all handlers mapped to <code>eventName/route</code></div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#unmap">unmap</a></b>(key)
								</div>
								<div class="description">Remove the mapping of <code>key</code> from the system</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#unmapHandler">unmapHandler</a></b>(eventName, key, handler)
								</div>
								<div class="description">Unmaps the handler for a specific event/route.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/dijon.System.html#unmapOutlet">unmapOutlet</a></b>(target, outlet)
								</div>
								<div class="description">removes an injection point mapping for a given object mapped to <code>key</code></div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>dijon.System</b>()
				</div>
				
				<div class="description">
					
					
				</div>
				
				
				
				
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			
				<div class="sectionTitle">
					Field Detail
				</div>
				
					<a name="autoMapOutlets"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>autoMapOutlets</b>
					
					</div>
					<div class="description">
						Enables the automatic mapping of outlets for mapped values, singletons and classes
When this is true any value, singleton or class that is mapped will automatically be mapped as a global outlet
using the value of <code>key</code> as outlet name
						
						
					</div>
					
					
					
					<pre class="code">var o = {
    userModel : undefined; //inject
}
system.mapSingleton( 'userModel', UserModel );
system.injectInto( o ):
//o.userModel now holds a reference to the singleton instance of UserModel</pre>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								false
							</dd>
							</dl>
						

					<hr />
				
					<a name="postInjectionHook"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>postInjectionHook</b>
					
					</div>
					<div class="description">
						The name of the method that will be called for all instances, right after injection has occured.
						
						
					</div>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								'setup'
							</dd>
							</dl>
						

					<hr />
				
					<a name="strictInjections"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>strictInjections</b>
					
					</div>
					<div class="description">
						When <code>true</code> injections are made only if an object has a property with the mapped outlet name.<br/>
<strong>Set to <code>false</code> at own risk</strong>, may have quite undesired side effects.
						
						
					</div>
					
					
					
					<pre class="code">system.strictInjections = true
var o = {};
system.mapSingleton( 'userModel', UserModel );
system.mapOutlet( 'userModel' );
system.injectInto( o );

//o is unchanged

system.strictInjections = false;
system.injectInto( o );

//o now has a member 'userModel' which holds a reference to the singleton instance
//of UserModel</pre>
					
					

						
						
						
						
							<dl class="detailList">
							<dt class="heading">Default Value:</dt>
							<dd>
								true
							</dd>
							</dl>
						

					
				
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="getObject"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>getObject</b>(key)
					
					</div>
					<div class="description">
						Retrieve (or create) the object mapped to <code>key</code>
						
						
					</div>
					
					
					
					<pre class="code">system.mapValue( 'foo', 'bar' );
var b = system.getObject( 'foo' ); //now contains 'bar'</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Object}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="hasMapping"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>hasMapping</b>(key)
					
					</div>
					<div class="description">
						Returns whether the key is mapped to an object
						
						
					</div>
					
					
					
					<pre class="code">system.mapValue( 'foo', 'bar' );
var isMapped = system.hasMapping( 'foo' );</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="injectInto"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>injectInto</b>(instance, key)
					
					</div>
					<div class="description">
						Perform an injection into an object's mapped outlets, satisfying all it's dependencies
						
						
					</div>
					
					
					
					<pre class="code">var UserModel = function(){
}
system.mapSingleton( 'userModel', UserModel );
var SomeClass = function(){
     user = undefined; //inject
}
system.mapSingleton( 'o', SomeClass );
system.mapOutlet( 'userModel', 'o', 'user' );

var foo = {
     user : undefined //inject
}

system.injectInto( foo, 'o' );

//foo.user now holds a reference to the singleton instance of UserModel</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>instance</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									<i>Optional</i>
								</dt>
								<dd>use the outlet mappings as defined for <code>key</code>, otherwise only the globally
mapped outlets will be used.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="instantiate"> </a>
					<div class="fixedFont">
					
					<span class="light">{Object}</span>
					<b>instantiate</b>(key)
					
					</div>
					<div class="description">
						Force instantiation of the class mapped to <code>key</code>, whether it was mapped as a singleton or not.
When a value was mapped, the value will be returned.
TODO: should this last rule be changed?
						
						
					</div>
					
					
					
					<pre class="code">         var SomeClass = function(){
         }
         system.mapClass( 'o', SomeClass );

         var s1 = system.getObject( 'o' );
         var s2 = system.getObject( 'o' );
//s1 and s2 reference different instances of SomeClass</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Object}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="mapClass"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>mapClass</b>(key, clazz)
					
					</div>
					<div class="description">
						Maps <code>clazz</code> as a factory to <code>key</code>
						
						
					</div>
					
					
					
					<pre class="code">var SomeClass = function(){
}
system.mapClass( 'o', SomeClass );

var s1 = system.getObject( 'o' );
var s2 = system.getObject( 'o' );

//s1 and s2 reference two different instances of SomeClass</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>clazz</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="mapHandler"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>mapHandler</b>(eventName/route, key, handler, oneShot, passEvent)
					
					</div>
					<div class="description">
						maps a handler for an event/route.<br/>
						
						
					</div>
					
					
					
					<pre class="code">         var hasExecuted = false;
         var userView = {
         showUserProfile : function(){
         hasExecuted = true;
         }
         }
         system.mapValue( 'userView', userView );
         system.mapHandler( 'user/profile', 'userView', 'showUserProfile' );
         system.notify( 'user/profile' );
         //hasExecuted is true</pre>
					
					<pre class="code">var userView = {
     showUserProfile : function(){
         //do stuff
     }
}
system.mapValue( 'userView', userView );
<strong>system.mapHandler( 'showUserProfile', 'userView' );</strong>
system.notify( 'showUserProfile' );

//userView.showUserProfile is called</pre>
					
					<pre class="code">var showUserProfile = function(){
         //do stuff
}
<strong>system.mapHandler( 'user/profile', undefined, showUserProfile );</strong>
system.notify( 'user/profile' );

//showUserProfile is called</pre>
					
					<pre class="code">var userView = {};
var showUserProfile = function(){
         //do stuff
}
system.mapValue( 'userView', userView );
<strong>system.mapHandler( 'user/profile', 'userView', showUserProfile );</strong>
system.notify( 'user/profile' );

//showUserProfile is called within the scope of the userView object</pre>
					
					<pre class="code">var userView = {
     showUserProfile : function(){
         //do stuff
     }
}
system.mapValue( 'userView', userView );
<strong>system.mapHandler( 'user/profile', 'userView', 'showUserProfile', true );</strong>
system.notify( 'user/profile' );
system.notify( 'user/profile' );
system.notify( 'user/profile' );

//userView.showUserProfile is called exactly once [!]</pre>
					
					<pre class="code">var userView = {
     showUserProfile : function( route ){
         //do stuff
     }
}
system.mapValue( 'userView', userView );
<strong>system.mapHandler( 'user/profile', 'userView', 'showUserProfile', false, true );</strong>
system.notify( 'user/profile' );

//userView.showUserProfile is called and the route/eventName is passed to the handler</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>eventName/route</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									<i>Optional, Default: undefined</i>
								</dt>
								<dd>If <code>key</code> is <code>undefined</code> the handler will be called without
scope.</dd>
							
								<dt>
									<span class="light fixedFont">{String|Function}</span> <b>handler</b>
									<i>Optional, Default: eventName</i>
								</dt>
								<dd>If <code>handler</code> is <code>undefined</code> the value of
<code>eventName</code> will be used as the name of the member holding the reference to the to-be-called function.
<code>handler</code> accepts either a string, which will be used as the name of the member holding the reference
to the to-be-called function, or a direct function reference.</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>oneShot</b>
									<i>Optional, Default: false</i>
								</dt>
								<dd>Defines whether the handler should be called exactly once and then automatically
unmapped</dd>
							
								<dt>
									<span class="light fixedFont">{Boolean}</span> <b>passEvent</b>
									<i>Optional, Default: false</i>
								</dt>
								<dd>Defines whether the event object should be passed to the handler or not.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/dijon.System.html#notify">dijon.System#notify</a></dd>
							
								<dd><a href="../symbols/dijon.System.html#unmapHandler">dijon.System#unmapHandler</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="mapOutlet"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>mapOutlet</b>(sourceKey, targetKey, outletName)
					
					</div>
					<div class="description">
						defines <code>outletName</code> as an injection point in <code>targetKey</code>for the object mapped to <code>sourceKey</code>
						
						
					</div>
					
					
					
					<pre class="code">         system.mapSingleton( 'userModel', TestClassA );
         var o = {
         user : undefined //inject
         }
         system.mapOutlet( 'userModel', 'o', 'user' );
         system.mapValue( 'o', o );

         var obj = system.getObject( 'o' );
//obj.user holds a reference to the singleton instance of UserModel</pre>
					
					<pre class="code">         system.mapSingleton( 'userModel', TestClassA );
         var o = {
         userModel : undefined //inject
         }
         system.mapOutlet( 'userModel', 'o' );
         system.mapValue( 'o', o );

         var obj = system.getObject( 'o' );
//obj.userModel holds a reference to the singleton instance of UserModel</pre>
					
					<pre class="code">         system.mapSingleton( 'userModel', TestClassA );
         system.mapOutlet( 'userModel' );
         var o = {
         userModel : undefined //inject
         }
         system.mapValue( 'o', o );

         var obj = system.getObject( 'o' );
//o.userModel holds a reference to the singleton instance of userModel</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>sourceKey</b>
									
								</dt>
								<dd>the key mapped to the object that will be injected</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>targetKey</b>
									<i>Optional, Default: 'global'</i>
								</dt>
								<dd>the key the outlet is assigned to.</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>outletName</b>
									<i>Optional, Default: sourceKey</i>
								</dt>
								<dd>the name of the property used as an outlet.<br/></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/dijon.System.html#unmapOutlet">dijon.System#unmapOutlet</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="mapSingleton"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>mapSingleton</b>(key, clazz)
					
					</div>
					<div class="description">
						Maps <code>clazz</code> as a singleton factory to <code>key</code>
						
						
					</div>
					
					
					
					<pre class="code">var SomeClass = function(){
}
system.mapSingleton( 'o', SomeClass );

var s1 = system.getObject( 'o' );
var s2 = system.getObject( 'o' );

//s1 and s2 reference the same instance of SomeClass</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{Function}</span> <b>clazz</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="mapValue"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>mapValue</b>(key, useValue)
					
					</div>
					<div class="description">
						Maps <code>useValue</code> to <code>key</code>
						
						
					</div>
					
					
					
					<pre class="code">system.mapValue( 'foo', 'bar' );
var b = system.getObject( 'foo' ); //now contains 'bar'</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>useValue</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="notify"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>notify</b>(eventName/route)
					
					</div>
					<div class="description">
						calls all handlers mapped to <code>eventName/route</code>
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>eventName/route</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/dijon.System.html#mapHandler">dijon.System#mapHandler</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="unmap"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>unmap</b>(key)
					
					</div>
					<div class="description">
						Remove the mapping of <code>key</code> from the system
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="unmapHandler"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>unmapHandler</b>(eventName, key, handler)
					
					</div>
					<div class="description">
						Unmaps the handler for a specific event/route.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>eventName</b>
									
								</dt>
								<dd>Name of the event/route</dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>key</b>
									<i>Optional, Default: undefined</i>
								</dt>
								<dd>If <code>key</code> is <code>undefined</code> the handler is removed from the
global mapping space. (If the same event is mapped globally and specifically for an object, then
only the globally mapped one will be removed)</dd>
							
								<dt>
									<span class="light fixedFont">{String | Function}</span> <b>handler</b>
									<i>Optional, Default: eventName</i>
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd><a href="../symbols/dijon.System.html#mapHandler">dijon.System#mapHandler</a></dd>
							
							</dl>
						

					<hr />
				
					<a name="unmapOutlet"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span>
					<b>unmapOutlet</b>(target, outlet)
					
					</div>
					<div class="description">
						removes an injection point mapping for a given object mapped to <code>key</code>
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>target</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<span class="light fixedFont">{String}</span> <b>outlet</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/dijon.System.html">dijon.System</a>}</span> </dd>
							
							</dl>
						
						
						
							<dl class="detailList">
							<dt class="heading">See:</dt>
							
								<dd>dijon.System#addOutlet</dd>
							
							</dl>
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Mon Apr 23 2012 08:37:26 GMT+0200 (CEST)
		</div>
	</body>
</html>
